﻿using System;
using System.Collections.Generic;
using System.Text;
using Model;
using DAL;

namespace BLL
{
    public class GoodsInfoBll
    {
        GoodsInfoDal gi = new GoodsInfoDal();

        /// <summary>
        /// 读取数据
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        public List<MGoodsInfo> ListGoodsInfo(MGoodsInfo mgoods)
        {
            return gi.ListGoodsInfo(mgoods);
        }

        /// <summary>
        /// 读取数据
        /// </summary>
        /// <param name="mgoods"></param>
        /// <param name="loginId"></param>
        /// <returns></returns>
        public List<MGoodsInfo> ListGoodsInfo(MGoodsInfo mgoods, int loginId)
        {
            return gi.ListGoodsInfo(mgoods, loginId);
        }

        public bool Save(List<MGoodsInfo> list)
        {
            return gi.Save(list);
        }

        /// <summary>
        /// 删除数据
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int Del(string ids, int sellerId)
        {
            return gi.Del(ids, sellerId);
        }

        /// <summary>
        /// 根据商品id获得商品明细信息
        /// </summary>
        /// <param name="goodsId"></param>
        /// <returns></returns>
        public List<GoodsDtlInfo> ListGoodsDtlInfo(string goodsId)
        {
            return gi.ListGoodsDtlInfo(goodsId);
        }

        /// <summary>
        /// 保存明细数据
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public bool SaveDtl(List<GoodsDtlInfo> list)
        {
            return gi.SaveDtl(list);
        }
    }
}
